package com.sky.ok.controller;

/*import com.sky.ok.entity.Test;
import com.sky.ok.service.TestRepository;*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 余心乐sky
 * @create 2018-11-01 9:40
 **/
/*@RestController
public class TestController {
    @Autowired
    private TestRepository testRepository;

    @GetMapping(value="/tests")
    public List<Test> testList(){
        return testRepository.findAll();
    }

    @PostMapping(value="/tests")
    public Test testAdd(@RequestParam("age")Integer age, @RequestParam("name")String name){
        Test base = new Test();
        base.setAge(age);
        base.setName(name);
        return testRepository.save(base);
    }


}*/
